<!DOCTYPE html>
<html>
	<head>

	<?php include 'gdb.php'?>
		<style>
		</style>
	</head>

	<body>

		<?php
			//call login information.

			//rgn_ stands for region.

			$rgn_prob = array (.03,.15,.11,.05,.09,.13,.07,.17,.20); // prob of being a region.
			
			$rgn_type = array ("Artic","Basin","Chaparral","Crystal","Desert","Forest","Jungle","Mountains","Plains"); //array to hold types.
			
			$rgn_stats = array("com","ext","frt","inf","hrt"); //holds "em stats
				
				
			//$rsc_types = array(""); NOTE FINALIZE

			$rgn_num = 21; // 21 regions.
			
			/*------------Probability calcs:------------					
					21 * r_prob[i] = favorable_chances; 
						ie:  21 * [.03] = .63
						  artic prob = .03 (.63 / 21)
			-------------------------------------------*/	
			
			for ($i = 1; $i <= $rgn_num; $i++)
			{
				//need to determine x location / y location within this for statement.
				
				$rtype = mt_rand(0,8);
				
				
				//insert into statement for MYSQL
				//$insert_into = "insert into game.rgn_info (rgn_id, type_id, com_stat, ext_stat, frt_stat, inf_stat, hrt_stat, resource_id, race_mkup) values (" . $i . ", " . $rtype "";
				
				 echo '<p>','id: ',$i,' type: <b>',$rgn_type[$rtype],'</b> <br> stats:  <br>';
				
				for($s = 0; $s <= 4; $s++)
				{
					$stat = mt_rand(0,3);		
					//$insert_into = $insert_into . ', ' . $stat;
					
					echo "&nbsp; &nbsp;", $rgn_stats[$s], ": ", $stat,"<br>"; 
					
				}		
				
				//for loop for resources.
				
				//for loop racial make up
							
				//close the $insert_into statement
				
				//insert into sql for the MySQL DB		
			}	
		?>	
	</body>
</html>